<?php

declare(strict_types=1);

namespace app\file\validate\admin;

use sheep\validate\Backend;

class Group extends Backend
{
    protected $rule = [
        'name' => 'require',
        'group' => 'require|alpha|unique:file_group,group'
    ];

    protected $message  =   [
        'name.require'     => '分组名称必须填写',
        'group.require'     => '分组标识必须填写',
        'group.alpha'     => '分组标识只支持字母',
        'group.unique'     => '分组标识不能重复',
    ];


    protected $scene = [
        'add'  =>  ['name', 'group'],
    ];
}
